''' 图像的放缩与插值 '''
import cv2 as cv

img = cv.imread('../resources/miku.jpg')
img = cv.resize(img, (img.shape[1] * 2, img.shape[0] * 2), interpolation=cv.INTER_CUBIC)
# interpolation 选择插值算法
# INTER_NEAREST 最近邻插值
# INTER_LINEAR 线性插值
# INTER_CUBIC 3x3 卷积核插值
# INTER_LANCZOS4 4x4 卷积核插值
# 指定倍数： (0, 0), fx=2, fy=2


cv.imshow('img', img)
cv.waitKey(0)
cv.destroyAllWindows()